@aparte/n8n-chat 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +161 -18
  2. package/dist/cards.d.ts +25 -1
  3. package/dist/cdn/chunks/{chunk-CZ5742JA.js → chunk-37ODPEBD.js} +1 -1
  4. package/dist/cdn/chunks/{chunk-CZ5742JA.js.map → chunk-37ODPEBD.js.map} +1 -1
  5. package/dist/cdn/chunks/{chunk-7JR7KL6J.js → chunk-DEOOTEDD.js} +2 -2
  6. package/dist/cdn/chunks/{chunk-7JR7KL6J.js.map → chunk-DEOOTEDD.js.map} +1 -1
  7. package/dist/cdn/chunks/{chunk-VTTH7HGO.js → chunk-NKYV5B7Q.js} +2 -2
  8. package/dist/cdn/chunks/{chunk-VTTH7HGO.js.map → chunk-NKYV5B7Q.js.map} +3 -3
  9. package/dist/cdn/chunks/{chunk-OJFRNS5M.js → chunk-RDVTD2YO.js} +2 -2
  10. package/dist/cdn/chunks/{chunk-OJFRNS5M.js.map → chunk-RDVTD2YO.js.map} +1 -1
  11. package/dist/cdn/chunks/{chunk-IPWLCOPM.js → chunk-U6354LAY.js} +2 -2
  12. package/dist/cdn/chunks/{chunk-IPWLCOPM.js.map → chunk-U6354LAY.js.map} +1 -1
  13. package/dist/cdn/chunks/{chunk-IWAJFJNA.js → chunk-ZNUFBTZ7.js} +8 -5
  14. package/dist/cdn/chunks/chunk-ZNUFBTZ7.js.map +7 -0
  15. package/dist/cdn/chunks/{de-JS3CQEVR.js → de-BCWJVDW5.js} +1 -1
  16. package/dist/cdn/chunks/{de-JS3CQEVR.js.map → de-BCWJVDW5.js.map} +1 -1
  17. package/dist/cdn/chunks/{es-OHKGLFEF.js → es-72JNODLG.js} +1 -1
  18. package/dist/cdn/chunks/{es-OHKGLFEF.js.map → es-72JNODLG.js.map} +1 -1
  19. package/dist/cdn/chunks/{fr-6S44XMU5.js → fr-ZKACSOY5.js} +1 -1
  20. package/dist/cdn/chunks/{fr-6S44XMU5.js.map → fr-ZKACSOY5.js.map} +1 -1
  21. package/dist/cdn/chunks/{highlight-FGIKUPIF.js → highlight-DG2OVLBT.js} +2 -2
  22. package/dist/cdn/chunks/{highlight-FGIKUPIF.js.map → highlight-DG2OVLBT.js.map} +1 -1
  23. package/dist/cdn/chunks/{it-K4WYXXDJ.js → it-SSBBMSGX.js} +1 -1
  24. package/dist/cdn/chunks/{it-K4WYXXDJ.js.map → it-SSBBMSGX.js.map} +1 -1
  25. package/dist/cdn/chunks/{items-S4LF2DJA.js → items-MITCIPF3.js} +3 -3
  26. package/dist/cdn/chunks/{items-S4LF2DJA.js.map → items-MITCIPF3.js.map} +1 -1
  27. package/dist/cdn/chunks/{ja-BN7TZW62.js → ja-NCV4Z63H.js} +1 -1
  28. package/dist/cdn/chunks/{ja-BN7TZW62.js.map → ja-NCV4Z63H.js.map} +1 -1
  29. package/dist/cdn/chunks/{ko-ARHO7UI3.js → ko-VCNS24WV.js} +1 -1
  30. package/dist/cdn/chunks/{ko-ARHO7UI3.js.map → ko-VCNS24WV.js.map} +1 -1
  31. package/dist/cdn/chunks/{link-C46K5O7X.js → link-7JYKZK3A.js} +2 -2
  32. package/dist/cdn/chunks/{link-C46K5O7X.js.map → link-7JYKZK3A.js.map} +1 -1
  33. package/dist/cdn/chunks/{media-QI5BPERX.js → media-7CZBXNEK.js} +2 -2
  34. package/dist/cdn/chunks/{media-QI5BPERX.js.map → media-7CZBXNEK.js.map} +1 -1
  35. package/dist/cdn/chunks/{order-YISYH73K.js → order-CPY2L7MI.js} +2 -2
  36. package/dist/cdn/chunks/{order-YISYH73K.js.map → order-CPY2L7MI.js.map} +1 -1
  37. package/dist/cdn/chunks/{place-UFCH3NQE.js → place-KQ3IA5IV.js} +43 -4
  38. package/dist/cdn/chunks/place-KQ3IA5IV.js.map +7 -0
  39. package/dist/cdn/chunks/{plan-KQWF73QI.js → plan-OKXEPKPV.js} +2 -2
  40. package/dist/cdn/chunks/{plan-KQWF73QI.js.map → plan-OKXEPKPV.js.map} +1 -1
  41. package/dist/cdn/chunks/{product-7UBLOMZ7.js → product-ONQRJRDO.js} +24 -4
  42. package/dist/cdn/chunks/product-ONQRJRDO.js.map +7 -0
  43. package/dist/cdn/chunks/{pt-BR-R7ZRM3GG.js → pt-BR-73MNA3YX.js} +1 -1
  44. package/dist/cdn/chunks/{pt-BR-R7ZRM3GG.js.map → pt-BR-73MNA3YX.js.map} +1 -1
  45. package/dist/cdn/chunks/{ru-FJNIMGMU.js → ru-SCEGVTR4.js} +1 -1
  46. package/dist/cdn/chunks/{ru-FJNIMGMU.js.map → ru-SCEGVTR4.js.map} +1 -1
  47. package/dist/cdn/chunks/{score-O2KEAYDS.js → score-QF27XJUE.js} +2 -2
  48. package/dist/cdn/chunks/{score-O2KEAYDS.js.map → score-QF27XJUE.js.map} +1 -1
  49. package/dist/cdn/chunks/{stats-GSXFRGYZ.js → stats-2W3GFI4P.js} +2 -2
  50. package/dist/cdn/chunks/{stats-GSXFRGYZ.js.map → stats-2W3GFI4P.js.map} +1 -1
  51. package/dist/cdn/chunks/{stock-53NVFLC3.js → stock-RCVJOOH4.js} +2 -2
  52. package/dist/cdn/chunks/{stock-53NVFLC3.js.map → stock-RCVJOOH4.js.map} +1 -1
  53. package/dist/cdn/chunks/{weather-VI2RCU4X.js → weather-NQGN2JOS.js} +2 -2
  54. package/dist/cdn/chunks/{weather-VI2RCU4X.js.map → weather-NQGN2JOS.js.map} +1 -1
  55. package/dist/cdn/chunks/{zh-CN-DUCWBXJP.js → zh-CN-4K6QPBRT.js} +1 -1
  56. package/dist/cdn/chunks/{zh-CN-DUCWBXJP.js.map → zh-CN-4K6QPBRT.js.map} +1 -1
  57. package/dist/cdn/n8n-chat.js +57 -57
  58. package/dist/cdn/n8n-chat.js.map +4 -4
  59. package/dist/create-chat.d.ts +39 -6
  60. package/dist/index.d.ts +3 -0
  61. package/dist/index.js +74 -42
  62. package/dist/index.js.map +1 -1
  63. package/dist/strings.d.ts +1 -1
  64. package/dist/style.css +383 -370
  65. package/dist/theme.css +381 -368
  66. package/package.json +7 -7
  67. package/dist/cdn/chunks/chunk-IWAJFJNA.js.map +0 -7
  68. package/dist/cdn/chunks/place-UFCH3NQE.js.map +0 -7
  69. package/dist/cdn/chunks/product-7UBLOMZ7.js.map +0 -7
package/README.md CHANGED
@@ -13,10 +13,11 @@ weather. [See it live](https://n8n-chat.apartejs.dev).
13
13
 
14
14
  - Rich cards your workflow writes as text: weather, order and booking, product, place, list, key
15
15
  figures, stock, plan, score, media, link. n8n's own chat shows the same answer as a code block.
16
+ - Extensible: your own cards, and aparté's plugins (maths, diagrams, charts) through `setup`.
16
17
  - Every option of `@n8n/chat` 1.43, the same defaults, the same session in the browser — and the
17
18
  Chat nodes' messages and buttons of a workflow that answers through response nodes.
18
19
  - Ten languages, keyboard and screen-reader access, readable contrast, a dark scheme.
19
- - About 100 KB (brotli) on the first load, against about 465 KB.
20
+ - About 143 KB compressed on the first load, against about 471 KB (measured 2026-10-31, `@n8n/chat` 1.44.7).
20
21
  - A handle to drive it from your page: `open`, `close`, `toggle`, `send`, `reset`, `setDisabled`,
21
22
  `destroy`.
22
23
  - MIT.
@@ -26,9 +27,9 @@ weather. [See it live](https://n8n-chat.apartejs.dev).
26
27
  ### From a CDN — no build step
27
28
 
28
29
  ```html
29
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aparte/n8n-chat@0.2.0/dist/style.css">
30
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aparte/n8n-chat@0.3.1/dist/style.css">
30
31
  <script type="module">
31
- import { createChat } from 'https://cdn.jsdelivr.net/npm/@aparte/n8n-chat@0.2.0/dist/cdn/n8n-chat.js';
32
+ import { createChat } from 'https://cdn.jsdelivr.net/npm/@aparte/n8n-chat@0.3.1/dist/cdn/n8n-chat.js';
32
33
 
33
34
  createChat({ webhookUrl: 'https://your-n8n.example.com/webhook/<id>/chat' });
34
35
  </script>
@@ -58,10 +59,10 @@ Replace the stylesheet and the import; the call stays as it is:
58
59
 
59
60
  ```diff
60
61
  - <link href="https://cdn.jsdelivr.net/npm/@n8n/chat/dist/style.css" rel="stylesheet" />
61
- + <link href="https://cdn.jsdelivr.net/npm/@aparte/n8n-chat@0.2.0/dist/style.css" rel="stylesheet" />
62
+ + <link href="https://cdn.jsdelivr.net/npm/@aparte/n8n-chat@0.3.1/dist/style.css" rel="stylesheet" />
62
63
  <script type="module">
63
64
  - import { createChat } from 'https://cdn.jsdelivr.net/npm/@n8n/chat/dist/chat.bundle.es.js';
64
- + import { createChat } from 'https://cdn.jsdelivr.net/npm/@aparte/n8n-chat@0.2.0/dist/cdn/n8n-chat.js';
65
+ + import { createChat } from 'https://cdn.jsdelivr.net/npm/@aparte/n8n-chat@0.3.1/dist/cdn/n8n-chat.js';
65
66
  createChat({ webhookUrl: 'https://your-n8n.example.com/webhook/<id>/chat' });
66
67
  </script>
67
68
  ```
@@ -108,7 +109,9 @@ memory on the agent only, n8n answers that request with an error.
108
109
  | `messageHistory` | a conversation to show when n8n has none (text, `type: 'component'`, `transparent`) | — |
109
110
  | `messageComponents` | functions that draw `type: 'component'` history messages | — |
110
111
  | `metadata` | sent with every message, as `metadata` in the trigger's output | — |
111
- | `allowFileUploads`, `allowedFilesMimeTypes` | let the person attach files, and which | `false`, any |
112
+ | `allowFileUploads`, `allowedFilesMimeTypes` | let the person attach files, and which (`'image/*,application/pdf'`, extensions too) | `false`, any |
113
+ | `cards` | draw the ` ```card-<name> ` blocks of an answer as [cards](#rich-cards); an object gives a card its options (`{ place: { mapTiles } }`) | `true` |
114
+ | `setup` | `(config) => stop?`: aparté's plugins and your own cards, on this chat ([below](#your-own-cards-and-apartés-plugins)) | — |
112
115
  | `enableMessageActions` | "Repost" and "Reuse" on the person's own messages | `false` |
113
116
  | `disabled` | block the input (`true`, or n8n's `{ value }`) | `false` |
114
117
  | `beforeMessageSent`, `afterMessageSent` | hooks around each message | — |
@@ -178,6 +181,111 @@ write JSON: it is exact every time, and a setting can turn it off for a chat tha
178
181
  cards. The [shop and booking workflows](https://n8n-chat.apartejs.dev/#workflows) do it that way.
179
182
  `cards: false` shows the blocks as code.
180
183
 
184
+ A card's own options go in `cards`, handed to it when it loads. The place card, for one, draws a map
185
+ of its own and fetches nothing; give it your map tiles and a place with `coordinates` sits on a real
186
+ map:
187
+
188
+ ```js
189
+ createChat({
190
+ webhookUrl: 'YOUR_PRODUCTION_URL',
191
+ cards: {
192
+ place: {
193
+ mapTiles: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
194
+ mapAttribution: '© OpenStreetMap contributors',
195
+ },
196
+ },
197
+ });
198
+ ```
199
+
200
+ Each tile is a request from the visitor's browser to that server, which is why it is your choice:
201
+ OpenStreetMap's tiles need no key but have [a usage policy](https://operations.osmfoundation.org/policies/tiles/)
202
+ against heavy traffic; MapTiler's or Stadia's take your key in the address.
203
+
204
+ ## Your own cards, and aparté's plugins
205
+
206
+ The widget is built with [aparté](https://apartejs.dev), and `setup` hands you its config: anything
207
+ aparté does, this chat can do. A card of your own is a `defineCard`, and your workflow sends it as
208
+ ` ```card-<its name> `:
209
+
210
+ ```js
211
+ import { createChat, defineCard, el } from '@aparte/n8n-chat';
212
+
213
+ const ticket = defineCard({
214
+ name: 'ticket',
215
+ variants: ['card'],
216
+ // A card draws its own padding, from the kit's variable, as the shipped cards do.
217
+ styles: '.aparte-ticket-card { padding: var(--aparte-rich-card-padding) } .aparte-ticket-card .id { font-weight: 600 }',
218
+ icon: '<svg viewBox="0 0 24 24"><path d="M4 6h16v12H4z" fill="none" stroke="currentColor"/></svg>',
219
+ normalize: (raw) => (raw?.id ? { id: String(raw.id), subject: String(raw.subject ?? ''), status: raw.status } : null),
220
+ render: (t) => [el('span', { class: 'id', text: t.id }), el('p', { text: t.subject }), el('small', { text: t.status })],
221
+ skeleton: () => [],
222
+ label: (t) => `Ticket ${t?.id ?? ''}`,
223
+ fallback: (t) => `Ticket ${t.id}: ${t.subject}`,
224
+ });
225
+
226
+ createChat({
227
+ webhookUrl: '…',
228
+ setup: (config) => ticket.setup({ config }),
229
+ });
230
+ ```
231
+
232
+ Take `defineCard` from the widget's own module, as above, and from the same URL when you load
233
+ it from a CDN (`…/@aparte/n8n-chat@0.3.1/dist/cdn/n8n-chat.js`): the card and the chat then share
234
+ one copy of aparté. A kit loaded from another URL keeps its cards where the chat never looks.
235
+
236
+ ````md
237
+ Your ticket is open.
238
+
239
+ ```card-ticket
240
+ { "id": "T-42", "subject": "Refund for order 1001", "status": "Waiting for us" }
241
+ ```
242
+ ````
243
+
244
+ The same `setup` adds aparté's plugins — maths, diagrams, charts — each in one line:
245
+
246
+ ```js
247
+ import { setupKatex } from '@aparte/plugin-katex';
248
+ import 'katex/dist/katex.min.css'; // KaTeX's own sheet: without it a formula shows twice
249
+ import { setupMermaid } from '@aparte/plugin-mermaid';
250
+
251
+ createChat({
252
+ webhookUrl: '…',
253
+ setup: (config) => {
254
+ const stops = [setupKatex({}, config), setupMermaid({}, config)];
255
+ return () => stops.forEach((stop) => stop());
256
+ },
257
+ });
258
+ ```
259
+
260
+ What `setup` returns, if a function, runs on `destroy()`.
261
+
262
+ ### All of aparté, at three levels
263
+
264
+ The widget's options keep `@n8n/chat`'s names so a page switches without rewriting, but everything
265
+ underneath is aparté, and you can reach it:
266
+
267
+ - **The config** — `setup(config)` hands you the chat's own `AparteConfig`: plugins, cards, segment
268
+ and tool renderers, icons (`config.registerIcons`), the locale (`config.setLocale`), the actions on a
269
+ message (`config.registerAction`). See the [configuration guide](https://apartejs.dev/guides/customization/).
270
+ - **The elements** — `chat.element` is the widget's root; the chat inside it is aparté's
271
+ `<aparte-chat>`, its field `<aparte-composer>`, and their attributes are theirs to set:
272
+
273
+ ```js
274
+ const chat = createChat({ webhookUrl: '…' });
275
+ chat.element.querySelector('aparte-composer')?.setAttribute('placeholder', 'Ask about your order…');
276
+ ```
277
+ - **The look** — aparté's `--aparte-*` variables, beside n8n's `--chat--*` ones:
278
+
279
+ ```css
280
+ /* n8n's variables for what n8n's widget already styles; aparté's for the rest. */
281
+ .aparte-n8n { --chat--message--border-radius: 14px; --aparte-font-family: 'Inter', sans-serif; }
282
+ /* The theme maps some aparté tokens from n8n's on the chat itself: set those there. */
283
+ .aparte-n8n aparte-chat { --aparte-radius-input: 20px; }
284
+ ```
285
+
286
+ What does not apply here is what needs the agent's loop in the page — a tool run in the browser, an
287
+ approval of a tool call: an n8n workflow runs its tools itself, on n8n.
288
+
181
289
  ## The page the visitor is on
182
290
 
183
291
  `metadata` is sent with every message and reaches the workflow as `$json.metadata`. Send the page,
@@ -221,11 +329,11 @@ so the page puts a fresh token in `metadata` before every message.
221
329
  2. In the page:
222
330
 
223
331
  ```html
224
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aparte/n8n-chat@0.2.0/dist/style.css">
332
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aparte/n8n-chat@0.3.1/dist/style.css">
225
333
  <script src="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit"></script>
226
334
  <div id="turnstile"></div>
227
335
  <script type="module">
228
- import { createChat } from 'https://cdn.jsdelivr.net/npm/@aparte/n8n-chat@0.2.0/dist/cdn/n8n-chat.js';
336
+ import { createChat } from 'https://cdn.jsdelivr.net/npm/@aparte/n8n-chat@0.3.1/dist/cdn/n8n-chat.js';
229
337
 
230
338
  // A Turnstile token is single-use and lasts five minutes: ask for a new one before each message.
231
339
  let widgetId;
@@ -283,28 +391,63 @@ English, French, Spanish, Portuguese (Brazil), German, Italian, Russian, Japanes
283
391
  Chinese (Simplified). A page downloads only the language it uses. Set `defaultLanguage`; override
284
392
  any word of the header or the input with `i18n`; give a whole `locale` for another language.
285
393
 
286
- ## Look
394
+ ## Colors
395
+
396
+ Your brand color, in one line. It colors the visitor's bubble, the send button, the links and the
397
+ button in the corner, in light and in dark:
287
398
 
288
- It wears n8n's look by default and reads n8n's main `--chat--*` variables — colors, fonts, radii,
289
- the window's size, the button — so a page that themed n8n's widget keeps most of its theme:
399
+ ```css
400
+ :root {
401
+ --chat--color--secondary: #c2410c;
402
+ }
403
+ ```
404
+
405
+ Keep white text readable on it: 4.5:1 or more (n8n's own `#20b69e` gives 2.55:1, which is why the
406
+ default here is `#178272`). Two more lines give the chat its own surroundings:
290
407
 
291
408
  ```css
292
409
  :root {
293
- --chat--color--primary: #e74266;
294
- --chat--color--secondary: #178272;
295
- --chat--window--width: 420px;
410
+ --chat--header--background: #9a3412; /* the bar with the title */
411
+ --chat--body--background: #fbf2ec; /* behind the messages, in light */
412
+ }
413
+ ```
414
+
415
+ | Variable | What it changes | When unset |
416
+ | --- | --- | --- |
417
+ | `--chat--color--secondary` | your bubble, the send button, links; tints the dark surfaces | `#178272` |
418
+ | `--chat--color--primary` | the button in the corner, when it should differ | `--secondary`, else n8n's `#e74266` |
419
+ | `--chat--header--background` / `--chat--header--color` | the title bar, in light and in dark | n8n's navy / `#f2f4f8` |
420
+ | `--chat--body--background` | behind the messages (light) | `#f2f4f8` |
421
+ | `--chat--message--bot--background` / `--chat--message--user--background` | one side's bubbles | white / `--secondary` |
422
+ | `--chat--font-family`, `--chat--border-radius`, `--chat--window--width` / `--height` | type, corners, the window | n8n's |
423
+
424
+ Hovers are derived from the color they darken, so one color never hovers back to n8n's green.
425
+
426
+ **Dark.** `colorScheme: 'dark'` always, `'auto'` when the visitor's system is dark (n8n's widget has
427
+ no dark scheme). It keeps your header and tints its navy with your `--secondary`, so the line above
428
+ is enough. For your own dark surfaces, set aparté's variables on the widget when it is dark:
429
+
430
+ ```css
431
+ .aparte-n8n[data-aparte-theme='dark'] { /* colorScheme: 'dark' */
432
+ --aparte-bg: #1a100a; /* behind the messages */
433
+ --aparte-surface-1: #2a1a11; /* the field, the cards */
434
+ --aparte-border: #4a2c1d;
435
+ --aparte-message-content-bg-assistant: #2c1b12;
296
436
  }
437
+ /* colorScheme: 'auto': the same, inside @media (prefers-color-scheme: dark)
438
+ on .aparte-n8n:not([data-aparte-theme]) */
297
439
  ```
298
440
 
299
- CSS written against n8n's `.chat-*` classes does not carry over; the variables do.
300
- `colorScheme: 'dark'` (or `'auto'`) gives the dark scheme. `@aparte/n8n-chat/theme.css` is the n8n
441
+ A page that themed n8n's widget keeps its variables; CSS written against n8n's `.chat-*` classes
442
+ does not carry over. Try a color, a header and the dark scheme side by side on
443
+ [n8n-chat.apartejs.dev](https://n8n-chat.apartejs.dev/#demo), which writes the CSS for you. `@aparte/n8n-chat/theme.css` is the n8n
301
444
  look alone, for a chat you compose yourself with
302
445
  [`@aparte/runner-n8n`](https://apartejs.dev/providers/agent/n8n/) and aparté's React, Vue, Svelte
303
446
  or Angular components, inside an `.aparte-n8n` element.
304
447
 
305
448
  ## Compared with `@n8n/chat`
306
449
 
307
- | | `@n8n/chat` 1.43 | `@aparte/n8n-chat` |
450
+ | | `@n8n/chat` (options checked on 1.43.3, weight on 1.44.7) | `@aparte/n8n-chat` |
308
451
  | --- | --- | --- |
309
452
  | Drive it from the page | — | `open`, `close`, `toggle`, `send`, `reset`, `setDisabled`, `destroy` |
310
453
  | A new conversation | not until the browser's storage is cleared | `reset()` |
@@ -315,7 +458,7 @@ or Angular components, inside an `.aparte-n8n` element.
315
458
  | Contrast of the visitor's bubble | 2.55:1 | 4.7:1 (WCAG AA) |
316
459
  | Dark scheme | — | ✓ |
317
460
  | Rich cards | the JSON as text | drawn: order, booking, product, weather… |
318
- | Weight, first load (brotli) | ~465 KB | ~100 KB, +~103 KB with the first code block |
461
+ | Weight, first load (compressed) | ~471 KB | ~143 KB |
319
462
  | License | Sustainable Use License | MIT |
320
463
 
321
464
  ## Versions
package/dist/cards.d.ts CHANGED
@@ -1,3 +1,27 @@
1
1
  import type { AparteConfig } from '@aparte/core';
2
+ import type { PlaceCardOptions } from '@aparte/plugin-cards/place';
3
+ /** Each card, and how to fetch it: one chunk per card in the CDN build too. */
4
+ declare const CARDS: {
5
+ weather: () => Promise<typeof import("@aparte/plugin-cards/weather")>;
6
+ items: () => Promise<typeof import("@aparte/plugin-cards/items")>;
7
+ product: () => Promise<typeof import("@aparte/plugin-cards/product")>;
8
+ place: () => Promise<typeof import("@aparte/plugin-cards/place")>;
9
+ stats: () => Promise<typeof import("@aparte/plugin-cards/stats")>;
10
+ order: () => Promise<typeof import("@aparte/plugin-cards/order")>;
11
+ stock: () => Promise<typeof import("@aparte/plugin-cards/stock")>;
12
+ plan: () => Promise<typeof import("@aparte/plugin-cards/plan")>;
13
+ score: () => Promise<typeof import("@aparte/plugin-cards/score")>;
14
+ media: () => Promise<typeof import("@aparte/plugin-cards/media")>;
15
+ link: () => Promise<typeof import("@aparte/plugin-cards/link")>;
16
+ };
17
+ /**
18
+ * A card's own options, handed to its setup when it loads, so passing them fetches nothing
19
+ * early. What is about where a card's data comes from (`tool`, `map`) is not here: the
20
+ * widget's blocks are that.
21
+ */
22
+ export type CardOptions = {
23
+ place?: Pick<PlaceCardOptions, 'mapTiles' | 'mapAttribution' | 'mapZoom' | 'currencySymbol' | 'builtIns'>;
24
+ } & Partial<Record<Exclude<keyof typeof CARDS, 'place'>, Record<string, unknown>>>;
2
25
  /** Draw the card blocks in this widget's answers. Returns the function that stops it. */
3
- export declare const setupCards: (config: AparteConfig) => (() => void);
26
+ export declare function setupCards(config: AparteConfig, options?: CardOptions): () => void;
27
+ export {};
@@ -1,2 +1,2 @@
1
1
  var f="http://www.w3.org/2000/svg";function k(u,{pad:c=.15,range:t}={}){let s=u.filter(Number.isFinite);if(s.length===0)return{line:"",area:"",points:[]};let l=s.length===1?[s[0],s[0]]:s,i=t?t[0]:Math.min(...s),x=(t?t[1]:Math.max(...s))-i,r=40,F=100/(l.length-1),e=l.map((n,d)=>[d*F,x===0?r/2:r-(c*r+(n-i)/x*(r-2*c*r))]),h=`M${e[0][0].toFixed(2)} ${e[0][1].toFixed(2)}`;for(let n=0;n<e.length-1;n++){let d=e[n-1]??e[n],p=e[n],o=e[n+1],$=e[n+2]??o,m=[p[0]+(o[0]-d[0])/6,p[1]+(o[1]-d[1])/6],b=[o[0]-($[0]-p[0])/6,o[1]-($[1]-p[1])/6];h+=` C${m[0].toFixed(2)} ${m[1].toFixed(2)} ${b[0].toFixed(2)} ${b[1].toFixed(2)} ${o[0].toFixed(2)} ${o[1].toFixed(2)}`}let A=e[e.length-1],g=`${h} L${A[0].toFixed(2)} ${r} L${e[0][0].toFixed(2)} ${r} Z`;return{line:h,area:g,points:e}}function v(u,c={}){let t=document.createElementNS(f,"svg");t.setAttribute("viewBox","0 0 100 40"),t.setAttribute("preserveAspectRatio","none"),t.setAttribute("aria-hidden","true"),t.setAttribute("focusable","false"),t.classList.add("aparte-rich-card__sparkline");for(let a of c.className?.split(/\s+/)??[])a&&t.classList.add(a);let{line:s,area:l}=k(u,c);if(!s)return t;if(c.area){let a=document.createElementNS(f,"path");a.setAttribute("d",l),a.setAttribute("class","aparte-rich-card__sparkline-area"),t.append(a)}let i=document.createElementNS(f,"path");return i.setAttribute("d",s),i.setAttribute("class","aparte-rich-card__sparkline-line"),i.setAttribute("vector-effect","non-scaling-stroke"),t.append(i),t}export{v as a};
2
- //# sourceMappingURL=chunk-CZ5742JA.js.map
2
+ //# sourceMappingURL=chunk-37ODPEBD.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../node_modules/.pnpm/@aparte+plugin-cards@0.29.2_@aparte+core@0.29.2/node_modules/@aparte/plugin-cards/src/kit/sparkline.ts"],
3
+ "sources": ["../../../node_modules/.pnpm/@aparte+plugin-cards@0.30.0_@aparte+core@0.30.0/node_modules/@aparte/plugin-cards/src/kit/sparkline.ts"],
4
4
  "sourcesContent": ["/**\n * A small line chart in SVG, with no dependency: the temperature over the next hours, a\n * price over a day. Built with `createElementNS` from numbers only, so a tool's values\n * never reach a parser. Stretched to its box (`preserveAspectRatio=\"none\"`), the stroke\n * kept at its width by `vector-effect`.\n */\nconst SVG = 'http://www.w3.org/2000/svg';\n\nexport interface SparklineOptions {\n /** Extra class on the `<svg>`. */\n className?: string;\n /** Fill the area under the line (a gradient from the stroke's colour, in the sheet). */\n area?: boolean;\n /** Padding above and below the line, as a share of the height (0.15 by default). */\n pad?: number;\n /** The value range to scale against, when several charts must share one. */\n range?: [number, number];\n}\n\n/** The points of a smooth line through `values`, in a 100 × 40 box. */\nexport function sparklinePath(values: number[], { pad = 0.15, range }: SparklineOptions = {}): { line: string; area: string; points: Array<[number, number]> } {\n // A gap (`null`, `NaN`) is left out: written into the path it would stop the drawing there.\n const finite = values.filter(Number.isFinite);\n if (finite.length === 0) return { line: '', area: '', points: [] };\n // One value is a level, drawn flat across the box: a single point would draw nothing.\n const series = finite.length === 1 ? [finite[0]!, finite[0]!] : finite;\n const lo = range ? range[0] : Math.min(...finite);\n const hi = range ? range[1] : Math.max(...finite);\n const span = hi - lo;\n const h = 40;\n const step = 100 / (series.length - 1);\n // A series that does not move is a flat line through the middle, not along the floor.\n const points = series.map((v, i): [number, number] => [\n i * step,\n span === 0 ? h / 2 : h - (pad * h + ((v - lo) / span) * (h - 2 * pad * h)),\n ]);\n // A Catmull-Rom curve through the points, written as cubic Béziers.\n let line = `M${points[0]![0].toFixed(2)} ${points[0]![1].toFixed(2)}`;\n for (let i = 0; i < points.length - 1; i++) {\n const p0 = points[i - 1] ?? points[i]!;\n const p1 = points[i]!;\n const p2 = points[i + 1]!;\n const p3 = points[i + 2] ?? p2;\n const c1: [number, number] = [p1[0] + (p2[0] - p0[0]) / 6, p1[1] + (p2[1] - p0[1]) / 6];\n const c2: [number, number] = [p2[0] - (p3[0] - p1[0]) / 6, p2[1] - (p3[1] - p1[1]) / 6];\n line += ` C${c1[0].toFixed(2)} ${c1[1].toFixed(2)} ${c2[0].toFixed(2)} ${c2[1].toFixed(2)} ${p2[0].toFixed(2)} ${p2[1].toFixed(2)}`;\n }\n const last = points[points.length - 1]!;\n const area = `${line} L${last[0].toFixed(2)} ${h} L${points[0]![0].toFixed(2)} ${h} Z`;\n return { line, area, points };\n}\n\n/** The chart as an `<svg>`; decorative (`aria-hidden`), so put the numbers in text beside it. */\nexport function sparkline(values: number[], options: SparklineOptions = {}): SVGSVGElement {\n const svg = document.createElementNS(SVG, 'svg');\n svg.setAttribute('viewBox', '0 0 100 40');\n svg.setAttribute('preserveAspectRatio', 'none');\n svg.setAttribute('aria-hidden', 'true');\n svg.setAttribute('focusable', 'false');\n svg.classList.add('aparte-rich-card__sparkline');\n // The caller's own class (its own prefix is its business), added beside ours.\n for (const name of options.className?.split(/\\s+/) ?? []) if (name) svg.classList.add(name);\n const { line, area } = sparklinePath(values, options);\n if (!line) return svg;\n if (options.area) {\n const fill = document.createElementNS(SVG, 'path');\n fill.setAttribute('d', area);\n fill.setAttribute('class', 'aparte-rich-card__sparkline-area');\n svg.append(fill);\n }\n const stroke = document.createElementNS(SVG, 'path');\n stroke.setAttribute('d', line);\n stroke.setAttribute('class', 'aparte-rich-card__sparkline-line');\n stroke.setAttribute('vector-effect', 'non-scaling-stroke');\n svg.append(stroke);\n return svg;\n}\n"],
5
5
  "mappings": "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",
6
6
  "names": ["SVG", "sparklinePath", "values", "pad", "range", "finite", "series", "lo", "span", "h", "step", "points", "v", "i", "line", "p0", "p1", "p2", "p3", "c1", "c2", "last", "area", "sparkline", "options", "svg", "name", "fill", "stroke"]
@@ -1,2 +1,2 @@
1
- import{a as i,b as p,i as l,j as g,p as e}from"./chunk-IWAJFJNA.js";var _="M12 2.6l2.9 5.9 6.5.95-4.7 4.6 1.1 6.5L12 17.5l-5.8 3.05 1.1-6.5-4.7-4.6 6.5-.95z",h=`<svg viewBox="0 0 120 24" xmlns="http://www.w3.org/2000/svg">${[0,24,48,72,96].map(a=>`<path transform="translate(${a} 0)" d="${_}"/>`).join("")}</svg>`;function u(a,c,{max:t=5,count:s,starsOnly:f=!1}={}){if(c===void 0||!Number.isFinite(c)||t<=0)return null;let d=Math.max(0,Math.min(t,c)),m=i("span",{class:"aparte-rich-card__stars",attrs:{"aria-hidden":"true"}},p(h,"aparte-rich-card__stars-base"),p(h,"aparte-rich-card__stars-fill"));m.style.setProperty("--aparte-rich-card-rating",`${d/t*100}%`);let n=i("span",{class:"aparte-rich-card__rating",attrs:{role:"img"}},m),o=r=>e(a.config,r,{maximumFractionDigits:1});if(!f){let r=i("span",{class:"aparte-rich-card__rating-value",attrs:{"aria-hidden":"true"}});a.bind(r,()=>o(d)),n.append(r)}if(s!==void 0&&Number.isFinite(s)){let r=i("span",{class:"aparte-rich-card__rating-count",attrs:{"aria-hidden":"true"}});a.bind(r,()=>`(${e(a.config,s,{notation:s>=1e4?"compact":"standard"})})`),n.append(r)}return a.bind(n,()=>{let r=l(a.config,"cardsRating",g.cardsRating,{value:o(d),max:o(t)});return s!==void 0&&Number.isFinite(s)?`${r}, ${l(a.config,"cardsReviews",g.cardsReviews,{count:e(a.config,s)})}`:r},"aria-label"),n}export{u as a};
2
- //# sourceMappingURL=chunk-7JR7KL6J.js.map
1
+ import{a as i,b as p,i as l,j as g,q as e}from"./chunk-ZNUFBTZ7.js";var _="M12 2.6l2.9 5.9 6.5.95-4.7 4.6 1.1 6.5L12 17.5l-5.8 3.05 1.1-6.5-4.7-4.6 6.5-.95z",h=`<svg viewBox="0 0 120 24" xmlns="http://www.w3.org/2000/svg">${[0,24,48,72,96].map(a=>`<path transform="translate(${a} 0)" d="${_}"/>`).join("")}</svg>`;function b(a,c,{max:t=5,count:s,starsOnly:f=!1}={}){if(c===void 0||!Number.isFinite(c)||t<=0)return null;let d=Math.max(0,Math.min(t,c)),m=i("span",{class:"aparte-rich-card__stars",attrs:{"aria-hidden":"true"}},p(h,"aparte-rich-card__stars-base"),p(h,"aparte-rich-card__stars-fill"));m.style.setProperty("--aparte-rich-card-rating",`${d/t*100}%`);let n=i("span",{class:"aparte-rich-card__rating",attrs:{role:"img"}},m),o=r=>e(a.config,r,{maximumFractionDigits:1});if(!f){let r=i("span",{class:"aparte-rich-card__rating-value",attrs:{"aria-hidden":"true"}});a.bind(r,()=>o(d)),n.append(r)}if(s!==void 0&&Number.isFinite(s)){let r=i("span",{class:"aparte-rich-card__rating-count",attrs:{"aria-hidden":"true"}});a.bind(r,()=>`(${e(a.config,s,{notation:s>=1e4?"compact":"standard"})})`),n.append(r)}return a.bind(n,()=>{let r=l(a.config,"cardsRating",g.cardsRating,{value:o(d),max:o(t)});return s!==void 0&&Number.isFinite(s)?`${r}, ${l(a.config,"cardsReviews",g.cardsReviews,{count:e(a.config,s)})}`:r},"aria-label"),n}export{b as a};
2
+ //# sourceMappingURL=chunk-DEOOTEDD.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../node_modules/.pnpm/@aparte+plugin-cards@0.29.2_@aparte+core@0.29.2/node_modules/@aparte/plugin-cards/src/kit/rating.ts"],
3
+ "sources": ["../../../node_modules/.pnpm/@aparte+plugin-cards@0.30.0_@aparte+core@0.30.0/node_modules/@aparte/plugin-cards/src/kit/rating.ts"],
4
4
  "sourcesContent": ["/**\n * A rating: stars filled to the value, the value, and how many reviews it averages.\n *\n * Two rows of the same five stars, the coloured one clipped to the value's width, so\n * 4.6 shows six tenths of the fifth star. Read aloud as one sentence (\"Rated 4.6 out\n * of 5, 1,284 reviews\"); the stars themselves are hidden from a screen reader.\n */\nimport type { CardContext } from './define.js';\nimport { el, glyph } from './dom.js';\nimport { formatNumber } from './format.js';\nimport { KIT_WORDS, word } from './strings.js';\n\nconst STAR = 'M12 2.6l2.9 5.9 6.5.95-4.7 4.6 1.1 6.5L12 17.5l-5.8 3.05 1.1-6.5-4.7-4.6 6.5-.95z';\nconst FIVE = `<svg viewBox=\"0 0 120 24\" xmlns=\"http://www.w3.org/2000/svg\">${[0, 24, 48, 72, 96].map((x) => `<path transform=\"translate(${x} 0)\" d=\"${STAR}\"/>`).join('')}</svg>`; // safe-attr: this package's own glyph constants and loop numbers, never data // safe-text: this package's own SVG, built from its glyph constants\n\nexport interface RatingOptions {\n /** The scale's top (5 by default). */\n max?: number;\n /** How many reviews the value averages. */\n count?: number;\n /** Leave the number out and keep the stars. */\n starsOnly?: boolean;\n}\n\n/** The rating as an element, or `null` for no value. */\nexport function rating(ctx: CardContext, value: number | undefined, { max = 5, count, starsOnly = false }: RatingOptions = {}): HTMLElement | null {\n if (value === undefined || !Number.isFinite(value) || max <= 0) return null;\n const clamped = Math.max(0, Math.min(max, value));\n const stars = el('span', { class: 'aparte-rich-card__stars', attrs: { 'aria-hidden': 'true' } },\n glyph(FIVE, 'aparte-rich-card__stars-base'),\n glyph(FIVE, 'aparte-rich-card__stars-fill'));\n stars.style.setProperty('--aparte-rich-card-rating', `${(clamped / max) * 100}%`);\n const node = el('span', { class: 'aparte-rich-card__rating', attrs: { role: 'img' } }, stars);\n const shown = (n: number) => formatNumber(ctx.config, n, { maximumFractionDigits: 1 });\n if (!starsOnly) {\n const number = el('span', { class: 'aparte-rich-card__rating-value', attrs: { 'aria-hidden': 'true' } });\n ctx.bind(number, () => shown(clamped));\n node.append(number);\n }\n if (count !== undefined && Number.isFinite(count)) {\n const reviews = el('span', { class: 'aparte-rich-card__rating-count', attrs: { 'aria-hidden': 'true' } });\n ctx.bind(reviews, () => `(${formatNumber(ctx.config, count, { notation: count >= 10_000 ? 'compact' : 'standard' })})`);\n node.append(reviews);\n }\n ctx.bind(node, () => {\n const sentence = word(ctx.config, 'cardsRating', KIT_WORDS.cardsRating, { value: shown(clamped), max: shown(max) });\n return count !== undefined && Number.isFinite(count)\n ? `${sentence}, ${word(ctx.config, 'cardsReviews', KIT_WORDS.cardsReviews, { count: formatNumber(ctx.config, count) })}`\n : sentence;\n }, 'aria-label');\n return node;\n}\n"],
5
5
  "mappings": "oEAYA,IAAMA,EAAO,oFACPC,EAAO,gEAAgE,CAAC,EAAG,GAAI,GAAI,GAAI,EAAE,EAAE,IAAKC,GAAM,8BAA8BA,CAAC,WAAWF,CAAI,KAAK,EAAE,KAAK,EAAE,CAAC,SAYlK,SAASG,EAAOC,EAAkBC,EAA2B,CAAE,IAAAC,EAAM,EAAG,MAAAC,EAAO,UAAAC,EAAY,EAAA,EAAyB,CAAA,EAAwB,CAC/I,GAAIH,IAAU,QAAa,CAAC,OAAO,SAASA,CAAK,GAAKC,GAAO,EAAG,OAAO,KACvE,IAAMG,EAAU,KAAK,IAAI,EAAG,KAAK,IAAIH,EAAKD,CAAK,CAAC,EAC1CK,EAAQC,EAAG,OAAQ,CAAE,MAAO,0BAA2B,MAAO,CAAE,cAAe,MAAA,CAAO,EACxFC,EAAMX,EAAM,8BAA8B,EAC1CW,EAAMX,EAAM,8BAA8B,CAAA,EAC9CS,EAAM,MAAM,YAAY,4BAA6B,GAAID,EAAUH,EAAO,GAAG,GAAG,EAChF,IAAMO,EAAOF,EAAG,OAAQ,CAAE,MAAO,2BAA4B,MAAO,CAAE,KAAM,KAAA,CAAM,EAAKD,CAAK,EACtFI,EAASC,GAAcC,EAAaZ,EAAI,OAAQW,EAAG,CAAE,sBAAuB,CAAA,CAAG,EACrF,GAAI,CAACP,EAAW,CACZ,IAAMS,EAASN,EAAG,OAAQ,CAAE,MAAO,iCAAkC,MAAO,CAAE,cAAe,MAAA,CAAA,CAAU,EACvGP,EAAI,KAAKa,EAAQ,IAAMH,EAAML,CAAO,CAAC,EACrCI,EAAK,OAAOI,CAAM,CACtB,CACA,GAAIV,IAAU,QAAa,OAAO,SAASA,CAAK,EAAG,CAC/C,IAAMW,EAAUP,EAAG,OAAQ,CAAE,MAAO,iCAAkC,MAAO,CAAE,cAAe,MAAA,CAAA,CAAU,EACxGP,EAAI,KAAKc,EAAS,IAAM,IAAIF,EAAaZ,EAAI,OAAQG,EAAO,CAAE,SAAUA,GAAS,IAAS,UAAY,UAAA,CAAY,CAAC,GAAG,EACtHM,EAAK,OAAOK,CAAO,CACvB,CACA,OAAAd,EAAI,KAAKS,EAAM,IAAM,CACjB,IAAMM,EAAWC,EAAKhB,EAAI,OAAQ,cAAeiB,EAAU,YAAa,CAAE,MAAOP,EAAML,CAAO,EAAG,IAAKK,EAAMR,CAAG,CAAA,CAAG,EAClH,OAAOC,IAAU,QAAa,OAAO,SAASA,CAAK,EAC7C,GAAGY,CAAQ,KAAKC,EAAKhB,EAAI,OAAQ,eAAgBiB,EAAU,aAAc,CAAE,MAAOL,EAAaZ,EAAI,OAAQG,CAAK,CAAA,CAAG,CAAC,GACpHY,CACV,EAAG,YAAY,EACRN,CACX",
6
6
  "names": ["STAR", "FIVE", "x", "rating", "ctx", "value", "max", "count", "starsOnly", "clamped", "stars", "el", "glyph", "node", "shown", "n", "formatNumber", "number", "reviews", "sentence", "word", "KIT_WORDS"]